function ASGetAll(){
	var array = new Array();
	for(var i=0;i<6;i++){
		for(var j=0;j<5;j++){
			array.push(new GDposition(i,j));
		}
	}
	return array;
}

function ASHPLessThan(array,param){
	var newArray = new Array();
	for(var i in array){
		if(null != array[i]&&CSgetState("生命值",CFindByPosition(array[i])) < parseInt(param)){
			newArray.push(array[i]);
		}
	}
	return newArray;
}

function ASBlank(array){
	var newArray = new Array();
	for(var i in array){
		if(null == CFindByPosition(array[i])){
			newArray.push(array[i]);
		}
	}
	return newArray;
}

function ASNotBlank(array){
	var newArray = new Array();
	for(var i in array){
		if(null != CFindByPosition(array[i])){
			newArray.push(array[i]);
		}
	}
	return newArray;
}

function ASSkillTarget(id,skillNo,array){
	var newArray = new Array();
	var chess = CFindById(id);
	var no = parseInt(skillNo);
	for(var i in array){
		if(SkillTarget(chess.position,array[i],chess.skill[skillNo].target)){
			if(chess.skill[skillNo].range == undefined)
				newArray.push(array[i]);
			else if(Range(chess.position,array[i],chess.skill[skillNo].range)){
				newArray.push(array[i]);
			}
		}
	}
	return newArray;
}

function ASRandomOne(array){
	return array[parseInt((array.length)*Math.random())];
}